package com.ps.service.dept;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.ps.dao.dept.WorkPositionDAO;
import com.ps.entity.Result;
import com.ps.pojo.dept.WorkPosition;
import com.ps.service.BaseService;

public interface WorkPositionService extends BaseService<WorkPosition> {

	/**
	 * 部门是否存在员工
	 * @param departmentId
	 * @return
	 */
	public boolean existsEmployee(Integer departmentId); 
	
	/**
	 * 岗位分页数据
	 * @param pageSize
	 * @param startIndex
	 * @return
	 */
	public Result findByPage(final int pageSize, final int startIndex);
	

	/**
	 * 岗位分页数据查询 等于departmentId 或是departmentId is null
	 * @param pageSize
	 * @param startIndex
	 * @param departmentId
	 * @return
	 */
	public Result findByPageFromDept(final int pageSize, final int startIndex, Integer departmentId, Integer findByPageType);
	
   
	/**
	 * 删除对应员工为0岗位,并返回有员工关联的岗位ID
	 * @param departmentId
	 * @param inputerId
	 * @return
	 */
    public Result delWPAndCountPersonIsZero(Integer departmentId,  Integer inputerId);
	
    
   /**
    * 更新岗位对应的部门
    * @param departmentId
    * @param orginDepartmentId
    * @param inputerId
    * @return
    */
    public Result moveToDept(Integer departmentId, Integer orginDepartmentId, Integer inputerId);
    
    /**
     * 更新岗位对应的部门
     * @param departmentId
     * @param orginDepartmentId
     * @param wpIds
     * @param inputerId
     * @return
     */
    public Result moveToDeptForUpt(Integer departmentId, Integer orginDepartmentId, Integer [] wpIds, Integer inputerId);
	
    /**
     * 删除岗位,如有员工则提示是否移动到其它部门
     * @param wpId
     * @param deptId
     * @return
     */
    public Result delete(Integer wpId, Integer deptId);
}
